package com.study.design.pattern.pattern.creational.singleton.reflectattack;

import java.lang.reflect.Constructor;

/**
 * @Author: gongsl
 * @Date: 2025-02-23 15:07
 * @description:
 */
public class Test {
    public static void main(String[] args) throws Exception {
        Constructor<InnerclassSingleton> constructor = InnerclassSingleton.class.getDeclaredConstructor();
        constructor.setAccessible(true);
        System.out.println("反射创建实例：" + constructor.newInstance());
    }
}
